package org.dgt.service.api;

import java.util.List;

import org.dgt.model.core.Image;
import org.dgt.model.core.UserInformation;
import org.dgt.web.model.ProductModel;
import org.springframework.security.access.annotation.Secured;

public interface ProductService {
	
	/**
	 * @return
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public List<ProductModel> getAllProductWithMinPrice();
	
	/**
	 * @return
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public ProductModel getProductWithMinPrice(Long productId);
	
	
	/**
	 * Get product's quantity
	 * @param productId
	 * @return number of products
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public int getQuantityOfProduct(Long productId);
	
	/**
	 * Get product's quantity that have the price 
	 * @param price
	 * @return number of products
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public int getQuantityOfProductWithPrice(Long productId, float price);
	
	/**
	 * Get all users who register price to sell the product 
	 * @param price
	 * @return
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public List<UserInformation> getSellerWithPrice(Long productId, float price);
	
	/**
	 * Get all users who register price to buy the product
	 * @param price
	 * @return
	 */
	@Secured("IS_AUTHENTICATED_ANONYMOUSLY")
	public List<UserInformation> getBuyerWithPrice(Long productId, float price);
	
	/**
	 * Get all product's images
	 * @return
	 */
	public List<Image> getImages(Long productId);
	
	
}
